cmake_minimum_required(VERSION 3.5)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_CFLAG "${CMAKE_CXX_CFLAG} -Wall -g")
include_directories(
    ${PROJECT_SOURCE_DIR}/include
        /usr/local/poco/include

)
link_directories(
    ${PROJECT_SOURCE_DIR}/lib
        /usr/local/poco/lib
)

set(SERVER imagefusion.grpc.pb.cc imagefusion.pb.cc server.cpp  )
add_executable(mainapprpc ${SERVER})
target_link_libraries(mainapprpc   
grpc
grpc++
protobuf
pthread
PocoFoundation
PocoUtil
PocoJSON
)


set(CLIENT imagefusion.grpc.pb.cc imagefusion.pb.cc testclient.cpp )
add_executable(tetsclient ${CLIENT})
target_link_libraries(tetsclient   
grpc
grpc++
protobuf
pthread
)

INSTALL(TARGETS mainapprpc tetsclient DESTINATION bin)
INSTALL(PROGRAMS startservice.sh DESTINATION bin)
